package STUDENT.TRANNGUYENQUAN.OOPs.OBJECT_AND_CLASSES.Bai4;

public class DateControllers {
	public int CheckDayOfMonth(Month months){
		int result = 0;
		switch (months.getMonth()) {
		case 4:
		case 6:
		case 9:
		case 11:
			result=30;
			break;
		case 2:
			if(months.getYears() % 400 == 0 || months.getYears() % 100 !=0){
				result=28;
				break;
			}else{
				result=29;
				break;
			}
		case 1:
		case 3:
		case 5:
		case 7:
		case 8:
		case 12:
			result=31;
			break;
		}
		return result;
	}
}
